package com.dxy.hms.service;

import com.dxy.hms.model.entity.Attachment;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dxy.hms.model.dto.FileUploadDto;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;

/**
* <p>
* 附件表 服务接口
* </p>
*
* @author dxy
* @since 2024-09-28
*/
public interface AttachmentService extends IService<Attachment> {

    void add(Attachment entity);

    void updById(Attachment entity);

    void delByIds(List<Long> ids);

    Attachment getDetail(Long id);

    IPage<Attachment> getPage(Long pageNum, Long pageSize);

    List<Attachment> batchUpload(List<FileUploadDto> dtoList);

    ResponseEntity<Resource> getAttachment(String type, Long id);

    List<Attachment> getFileList(String bizType, String bizId);

    void delByBizTypeAndBizId(String bizType, String bizId);
}
